package com.sky.mapper;

import com.sky.dto.ShoppingCartDTO;
import com.sky.entity.ShoppingCart;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

import java.util.ArrayList;
import java.util.List;

@Mapper
public interface ShoppingcartMapper {

@Update("update shopping_cart set number = #{number} where id = #{id} ;")
    void update(ShoppingCart shoppingCart);

    List<ShoppingCart> selectByCondition(ShoppingCart shoppingCartCondition);

    void insert(ShoppingCart shoppingCartCondition);

    void clean(ShoppingCart shoppingCart);

    void sub(ShoppingCartDTO shoppingCartDTO);

    void deleteById(Long id);

    void deleteById1(Long currentId);

    void insertBatch(ArrayList<ShoppingCart> shoppingCarts);

}
